import axios from './axios'
export function getInfo() {
    return axios.get('/getJsonInfo');
}
export function getWether() {
    // return axios.get('http://api.seniverse.com/v3/weather/daily.json?key=SegOW2yOnYuqW_TsH&location=beijing&language=zh-Hans&unit=c&start=0&days=7')
    return axios.get('/wether')
}
export function dologin(params) {
    return axios.post('/user/login', params);
}
export function verify(params) {
    return axios.get('/user/verifyToken', params);
}
export function dosignup(params) {
    return axios.post('/user/signup', params);
}
export function getUserInfo() {
    return axios.get('/user/getUserinfo');
}
export function updateUserInfo(params) {
    return axios.post('/user/update', params);
}
export function getUserInfoById(params) {
    return axios.post('/user/getUserInfoById', params);
}
export function modifyUserInfo(params) {
    return axios.post('/user/modify', params);
}
export function modifyUserLight(params) {
    return axios.post('/user/modify/light', params);
}
export function releaseNote(params) {
    return axios.post('/note/release', params);
}
export function getAllNoteByUserId(params) {
    return axios.post('/getAllNoteByUserId', params);
}
export function getAllNote(params) {
    return axios.post('/note/getAllNote', params);
}
export function getNoteById(params) {
    return axios.post('/note/getNoteDetail', params);
}
export function deleteNoteById(params) {
    return axios.post('/note/deleteNoteById', params);
}
export function searchBirdByImg(params) {
    return axios.post('/getBirdByUrl', params);
}
export function searchbirdByBase64(params) {
    return axios.post('/searchbirdbybase64', params);
}
// 发布留言
export function leaveWords(params) {
    return axios.post('/note/leavewords', params)
}
export function addFollower(params) {
    return axios.post('/follower/addFollower', params)
}
export function cancelFollower(params) {
    return axios.post('/follower/cancelFollower', params)
}
export function doLike(params) {
    return axios.post('/note/likeNote', params)
}
export function doUnLike(params) {
    return axios.post('/note/unlikeNote', params)
}
export function addBird(params) {
    return axios.post('/bird/addBird', params)
}
export function getBirdsByClassify(params) {
    return axios.post('/bird/getBirdsByClassify', params)
}
export function getBirdById(params) {
    return axios.post('/bird/getBirdinfo', params)
}
export function getFuzzyquery(params) {
    return axios.post('/bird/fuzzyquery', params)
}

export function upload(params) {
    return axios.post(
        "/upload",
        params,
        {
            headers: {
                "content-type": "multer/form-data"
            }
        }
    )
}

// export function getNCWether() {
//     return axios({
//         method: 'get',
//         url: 'https://api.seniverse.com/v3/weather/daily.json?key=SegOW2yOnYuqW_TsH&location=nanchang&language=zh-Hans&unit=c&start=0&days=5',
//         headers: {
//             'Content-Type': 'application/json',
//             'Accept': 'application/json'
//         }
//     }).then(res => {
//         console.log('getNCWether', res);
//     }).catch(err => {
//         console.log(err)
//     })
// }


